﻿@model IList<Eoffice.Models.LOAICV>

@{
    ViewBag.Title = "DANH SÁCH LOẠI CÔNG VĂN";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}

<h1>@ViewBag.Title</h1>

@using (Html.BeginForm("MultiDelete", "LoaiCv", FormMethod.Post))
{
    <div class="Control">
        <ul>
            <li>@Html.ActionLink("Thêm mới", "Create", "", new { @class = "vadd" })</li>
            <li>
                <input type="submit" value="Xóa" class="mulDel" /></li>
            <li>@Html.ActionLink("Làm mới", "Index", "", new { @class = "vrefresh" })</li>
            <li><a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Trở lại</a></li>
        </ul>
    </div>

    <table class="TableView" border="1" id="myTable">
        <tr class="trHeader">
            <th class="CheckBoxsmall">
                <input type="checkbox" onclick="Javascript: chkSelectAll_OnClick(this)" id="chkSelectAll" /></th>
            <th class="Text">MÃ LOẠI CÔNG VĂN</th>
            <th class="Text">TÊN LOẠI CÔNG VĂN</th>
            <th class="Function"></th>
        </tr>
        @for (int i = 0; i < Model.Count; i++)
        {
            if (i % 2 == 0)
            {
            <tr id="trOdd_@i" class="trOdd" onmousemove="Javascript:chkSelect_OnMouseMove(this)" onmouseout="Javascript:chkSelect_OnMouseOut(this,0)">
                <td class="CheckBoxsmall">@Html.CheckBox("chk" + Model[i].MALOAI, new { id = "chkSelect", onclick = "Javascript:chkSelect_OnClick(this,0)", @class = "chk" })</td>
                <td class="Text">@Html.ActionLink("Sửa", "Edit", "LoaiCv", new { id = Model[i].MALOAI }, new { @class = "vedit" })&nbsp;@Html.DisplayFor(lv => Model[i].MALOAI)</td>
                <td class="Text">@Html.DisplayFor(lv => Model[i].TENLOAI)</td>
                <td class="Function">
                    
                    @Html.ActionLink("Xóa", "Delete", "LoaiCv", new { id = Model[i].MALOAI }, new { @onclick = "return DeleteConfirm()", @class = "vdelete" })
                </td>
            </tr>
            }
            else
            {
            <tr id="trEven_@i" class="trEven" onmousemove="Javascript:chkSelect_OnMouseMove(this)" onmouseout="Javascript:chkSelect_OnMouseOut(this,@i)">
                <td class="CheckBoxsmall">@Html.CheckBox("chk" + Model[i].MALOAI, new { id = "chkSelect", onclick = "Javascript:chkSelect_OnClick(this,0)", @class = "chk" })</td>
                <td class="Text">@Html.ActionLink("Sửa", "Edit", "LoaiCv", new { id = Model[i].MALOAI }, new { @class = "vedit" })&nbsp;@Html.DisplayFor(lv => Model[i].MALOAI)</td>
                <td class="Text">@Html.DisplayFor(lv => Model[i].TENLOAI)</td>
                <td class="Function">
                    
                    @Html.ActionLink("Xóa", "Delete", "LoaiCv", new { id = Model[i].MALOAI }, new { @onclick = "return DeleteConfirm()", @class = "vdelete" })
                </td>
            </tr>
            }
        }
    </table>
    @Html.Raw(ViewBag.Pager)
    <div class="Control">
        <ul>
            <li>@Html.ActionLink("Thêm mới", "Create", "", new { @class = "vadd" })</li>
            <li>
                <input type="submit" value="Xóa" class="mulDel" /></li>
            <li>@Html.ActionLink("Làm mới", "Index", "", new { @class = "vrefresh" })</li>
            <li><a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Trở lại</a></li>
        </ul>
    </div>
}